<?php
if (isset($_SESSION['X_CART'])){
	$cart = $_SESSION['X_CART'];
	$pids = $cart->getProducts();
	$cpids = count($pids);
	if($cpids == 0){
		$cpids =NULL;
	}
}
?>

<div id="nav">
<div class="wrapper">
<h2 class="accessibility">Navigation</h2>
	  <ul id="primary-nav" class="menuList">
    	<li><a href="index.php" title="Home">Home</a></li>
<?php
if (!isset($_SESSION['X_USER'])) {
?>
	    <li><a href="index_public.php?entity=public&action=finance&title=Finance">Finance</a></li>
	    <li><a href="index_public.php?entity=public&action=aboutus&title=About Us">About us</a></li>
	    <li><a href="index_public.php?entity=public&action=contact&title=Contact Us">Contact us</a></li>
		<li><a href="index_public.php?entity=public&action=enquiry&title=Enquiry">Enquiry</a></li>
<?php
}
if (Security::isCurrentUserGrantedWith("ROLE_ADMIN")) {
?>
		<li><a href="index_user.php?action=new">User </a></li>
		<li><a href="index_admin.php?entity=car&action=list">Car </a></li>
		<li><a href="index_admin.php?entity=caroption&action=list">Car Options</a></li>
<?php
}
if (Security::isCurrentUserGrantedWith("ROLE_CUSTOMER")) {
?>	
		<li><a href="index_public.php?entity=public&action=finance&title=Finance">Finance</a></li>
	    <li><a href="index_public.php?entity=public&action=aboutus&title=About Us">About us</a></li>
	    <li><a href="index_public.php?entity=public&action=contact&title=Contact Us">Contact us</a></li>
  		<li><a href="index_public.php?entity=public&action=enquiry&title=Enquiry">Enquiry</a></li>
<?php
}
?>
	  </ul>
</div>
<hr/>
</div>